package XieCheng;

import java.util.Iterator;
import java.util.Scanner;
import java.util.TreeSet;

/**
 * Description：
 * Author: zhangc
 * Date：2017/9/21 20:20
 */
public class Mi {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        TreeSet<Integer> set = new TreeSet<>();
        int m = in.nextInt();
        for (int i = 0; i < m; i++) {
            set.add(in.nextInt());
        }
        int n = in.nextInt();
        for (int i = 0; i < n; i++) {
            set.add(in.nextInt());
        }
        int size = set.size();
        int[] arr = new int[ size ];
        Iterator<Integer> iterator = set.iterator();
        int i = 0;
        while (iterator.hasNext()) {
            arr[ i++ ] = iterator.next();
        }
        int result = 0;
        int index;
        if (size > 0 && size % 2 == 0) {
            index = size >> 1;
            result = arr[ index ] + arr[ index - 1 ];
            System.out.println(result / 2.0);
        } else if (size > 0 && size % 2 == 1) {
            result = arr[ ((size + 1) >> 1) - 1 ];
            System.out.println(result / 1.0);
        }
    }
}
